1. Technical Field
The present invention relates to an imaging apparatus, and a control method and a control program for an imaging apparatus, and in particular to an imaging apparatus equipped with a color image pickup device, and a control method and control program for an imaging apparatus of the same.
2. Related Art
A primary system color Bayer array (see, for example, Patent Documents 1 to 3), this being a color array widely employed in color image pickup devices, has red (R) and blue (B) placed in sequential lines of a chessboard pattern of green (G) pixels, to which the human eye is most sensitive and that contribute most to obtaining a brightness signal.    Patent Document 1: Japanese Patent Application Laid-Open (JP-A) No. 2002-135793    Patent Document 2: Japanese Patent No. 3960965    Patent Document 3: JP-A No. 2004-266369
However, sometimes color mixing occurs during image capture using a color image pickup device due to the influence of light leaking in from adjacent pixels. In such cases, normally a color mixing ratio due to the influence of light leaking in from adjacent pixels is measured in advance, and then pixel data for each of the pixels is corrected based on this color mixing ratio.
In a color image pickup device employing a conventional Bayer array, in order to, for example, generate image data for a video, in cases in which 1 line worth of pixel data is read from every 3 pixel lines in the vertical direction (vertical direction 1/3 thinning), and 1 pixel worth of image data is read for every 3 pixels in the horizontal direction (horizontal direction 1/3 thinning), both an image read by thinning and the original image are the same Bayer array. Therefore the color of a pixel adjacent to a subject pixel for color mixing correction is the same before thinning as after thinning, and thereof color mixing correction may be performed unmodified by employing pixel values of pixels adjacent in the image after thinning.
However, in cases in which a color filter is employed with a basic array pattern, this being the smallest repeating unit, that is larger than that of a Bayer array, for example a 6×6 pixel basic array pattern, in cases in which 1/2 thinning or 1/3 thinning is performed in both the vertical direction and the horizontal direction, sometimes the image after thinning has a different array to the basic array pattern of the image before thinning. In such cases, the color of the pixel that is adjacent to a subject pixel for color mixing correction is a different color to the pixel that is adjacent prior to thinning, resulting in the problem that the precision of color mixing correction deteriorates if color mixing correction is performed unmodified using pixel values of pixels that are adjacent the image after thinning.